function DialogIPayment(container, item, options) {
  this._container = container;
  this._item = item;
  this._options = options;
  this._createElements();
};
DialogIPayment.prototype._createElements = function() {
  var gui, input, table, tr, td,  _self = this, unique = MiscUtils.unique();
  
  DOMUtils.removeChildElements(this._container);
  
  table = document.createElement('table');
  table.style.width = '900px';
  table.cellPadding = 0;
  table.cellSpacing = 0;
  table.border=0
  table.style.backgroundColor = '#ebebe3';
  this._container.appendChild(table);
  
  tr = table.insertRow(-1);
  td = tr.insertCell(-1);
  td.style.width = '900px';
  td.style.height = '45px';
  td.style.textAlign = 'center';
  td.style.fontWeight = 'bold';
  td.style.color = '#633e36';
  td.style.fontSize = '15px';
  td.style.verticalAlign = 'middle';
  td.id = unique + '_customNo_div';
  
  tr = table.insertRow(-1);
  td = tr.insertCell(-1);
  td.style.width = '900px';
  td.style.height = '45px';
  td.style.paddingLeft = '25px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'middle';
  td.id = unique + '_orderTab_div';
  
  tr = table.insertRow(-1);
  td = tr.insertCell(-1);
  td.style.width = '900px';
  td.style.height = '45px';
  td.style.padding = '0 10px 10px 10px';
  td.style.textAlign = 'center';
  td.style.verticalAlign = 'top';
  var table1 = document.createElement('table');
  table1.style.width = '880px';
  table1.cellPadding = 0;
  table1.cellSpacing = 0;
  table1.style.padding = '18px 15px';
  td.appendChild(table1);
  
  tr = table1.insertRow(-1);
  td = tr.insertCell(-1);
  td.style.width = '850px';
  td.style.height = '11px';
  td.colSpan = '3';
  var table10 = document.createElement('table');
  table10.style.width = '850px';
  table10.cellPadding = 0;
  table10.cellSpacing = 0;
  table10.border=0
  td.appendChild(table10);
  
  tr10 = table10.insertRow(-1);
  td = tr10.insertCell(-1);
  td.style.width = '80px';
  td.style.height = '11px';
  td.style.fontWeight = 'bold';
  td.style.fontSize = '110%';
  td.style.color = '#694247';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'middle';
  td.appendChild(document.createTextNode('Total Price'));
  
  td = tr10.insertCell(-1);
  td.style.width = '225px';
  td.style.height = '11px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'middle';
  td.id = unique + '_price_div';
  
  td = tr10.insertCell(-1);
  td.style.width = '102px';
  td.style.height = '11px';
  td.style.textAlign = 'right';
  td.style.paddingRight = '10px';
  td.style.verticalAlign = 'middle';
  td.style.fontWeight = 'bold';
  td.style.fontSize = '110%';
  td.style.color = '#694247';
  td.appendChild(document.createTextNode('Total Received'));
  
  td = tr10.insertCell(-1);
  td.style.width = '120px';
  td.style.height = '11px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'middle'
  td.id = unique + '_received_div';
  
  td = tr10.insertCell(-1);
  td.style.width = '155px';
  td.style.height = '11px';
  td.style.textAlign = 'right';
  td.style.paddingRight = '10px';
  td.style.verticalAlign = 'middle'
  td.style.fontWeight = 'bold';
  td.style.fontSize = '110%';
  td.style.color = '#694247';
  td.appendChild(document.createTextNode('Total Anticipated '));
  
  td = tr10.insertCell(-1);
  td.style.width = '148px';
  td.style.height = '11px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'middle';
  td.id = unique + '_anticipated_div';
  
  tr1 = table1.insertRow(-1);
  td = tr1.insertCell(-1);
  td.style.width = '380px';
  td.style.height = '75px';
  td.style.fontWeight = 'bold';
  td.style.fontSize = '110%';
  td.style.color = '#694247';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top'
  var table2 = document.createElement('table');
  table2.style.width = '380px';
  table2.cellPadding = 0;
  table2.cellSpacing = 0;
  table2.style.verticalAlign = 'top';
  table2.id = unique + '_payment1_div';
  table2.border=0
  td.appendChild(table2);
  
  tr2 = table2.insertRow(-1);
  td = tr2.insertCell(-1);
  td.style.width = '97px';
  td.style.height = '50px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '4px';
  td.appendChild(document.createTextNode('Deposit '));
  
  td = tr2.insertCell(-1);
  td.style.width = '90px';
  td.style.height = '50px';
  td.style.textAlign = 'center';
  td.style.verticalAlign = 'bottom';
  var input = DOMUtils.createInput('', '', 'text', '', null)
  input.id = unique + '_payment1_text';
  input.style.width = '90px';
  input.style.borderRight = 'solid 1px #fff';
  input.style.borderBottom = 'solid 1px #fff';
  input.style.borderTop = 'solid 1px #d2c4b9';
  input.style.borderLeft = 'solid 1px #d2c4b9';
  input.style.height = '18px';
  td.appendChild(input);
  
  td = tr2.insertCell(-1);
  td.style.width = '40px';
  td.style.height = '44px';
  td.style.paddingBottom = '6px';
  td.style.textAlign = 'center';
  td.style.color = '#000';
  td.style.fontWeight = 'normal'; 
  td.style.fontSize = '9pt';
  td.style.verticalAlign = 'bottom';
  td.id = unique + '_paymentPercent1_div';
  
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.textAlign = 'right';
  td.style.verticalAlign = 'bottom'
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_depCash_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.paddingBottom = '5px';
  td.style.verticalAlign = 'bottom';
  td.appendChild(document.createTextNode('C'));
  
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.verticalAlign = 'bottom'
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_depBank_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '5px';
  td.appendChild(document.createTextNode('B'));
  td = tr2.insertCell(-1);
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_depQueck_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '5px';
  td.appendChild(document.createTextNode('Q'));
  td = tr2.insertCell(-1);
  td.style.width = '70px';
  td.style.verticalAlign = 'bottom'
  var btn = DOMUtils.createInput('', '', 'button', '', null);
  btn.className = "paid";
  btn.id = unique + '_paid1_button';
  td.appendChild(btn);
  
  tr2 = table2.insertRow(-1);
  td = tr2.insertCell(-1);
  td.style.height = '5px';
  td.colSpan = '10';
  td.align = 'right';
  var table3 = document.createElement('table');
  table3.style.height = '10px';
  table3.cellPadding = 0;
  table3.cellSpacing = 0;
  table3.align = 'right';
  table3.border=0
  td.appendChild(table3);
  
  tr3 = table3.insertRow(-1);
  td = tr3.insertCell(-1);
  td.colSpan = '10';
  td.style.padding = '3px 0';
  td.style.color = '#555555';
  td.style.fontWeight = 'normal'; 
  td.style.fontSize = '8pt';
  td.style.fontStyle = 'italic';
  td.align = 'right';
  td.id = unique + '_paidHistory1_div';
  
  tr3 = table3.insertRow(-1);
  td = tr3.insertCell(-1);
  td.style.height = '32px';
  td.style.paddingTop = '6px';
  td.align = 'right';
  td.style.verticalAlign = 'middle';
  var table9 = document.createElement('table');
  table9.style.height = '32px';
  table9.style.verticalAlign = 'top';
  table9.cellPadding = 0;
  table9.cellSpacing = 0;
  td.appendChild(table9);
  
  tr9 = table9.insertRow(-1);
  td = tr9.insertCell(-1);
  td.style.width = '30px';
  td.style.verticalAlign = 'top';
  td.style.textAlign = 'left';
  td.id = unique + '_paidc1_div';
  td.appendChild(document.createTextNode('Paid:'));
  td = tr9.insertCell(-1);
  td.style.width = '70px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.style.color = '#000';
  td.style.fontWeight = ''; 
  td.style.fontSize = '9pt';
  td.id = unique + '_paid1_div';
  td = tr9.insertCell(-1);
  td.style.width = '30px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.appendChild(document.createTextNode('Due:'));
  td = tr9.insertCell(-1);
  td.style.width = '160px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.style.color = '#000';
  td.style.fontWeight = ''; 
  td.style.fontSize = '9pt';
  td.id = unique + '_due1_div';
  
  td = tr1.insertCell(-1);
  td.style.width = '60px';
  
  td = tr1.insertCell(-1);
  td.style.width = '380px';
  td.style.height = '75px';
  td.style.fontWeight = 'bold';
  td.style.fontSize = '110%';
  td.style.color = '#694247';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top'
  var table2 = document.createElement('table');
  table2.style.width = '380px';
  table2.cellPadding = 0;
  table2.cellSpacing = 0;
  table2.style.verticalAlign = 'top';
  table2.id = unique + '_payment2_div';
  table2.border=0
  td.appendChild(table2);
  
  tr2 = table2.insertRow(-1);
  td = tr2.insertCell(-1);
  td.style.width = '97px';
  td.style.height = '50px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '4px';
  td.appendChild(document.createTextNode('2'));
  var span = document.createElement('span');
  span.style.verticalAlign = 'super';
  span.style.fontSize = '80%';
  span.appendChild(document.createTextNode('nd'));
  td.appendChild(span);
  td.appendChild(document.createTextNode(' Payment'));
  
  
  td = tr2.insertCell(-1);
  td.style.width = '90px';
  td.style.height = '50px';
  td.style.textAlign = 'center';
  td.style.verticalAlign = 'bottom';
  var input = DOMUtils.createInput('', '', 'text', '', null)
  input.id = unique + '_payment2_text';
  input.style.borderRight = 'solid 1px #fff';
  input.style.borderBottom = 'solid 1px #fff';
  input.style.borderTop = 'solid 1px #d2c4b9';
  input.style.borderLeft = 'solid 1px #d2c4b9';
  input.style.width = '90px';
  input.style.height = '18px';
  td.appendChild(input);
  
  td = tr2.insertCell(-1);
  td.style.width = '40px';
  td.style.height = '44px';
  td.style.paddingBottom = '6px';
  td.style.textAlign = 'center';
  td.style.color = '#000';
  td.style.fontWeight = 'normal'; 
  td.style.fontSize = '9pt';
  td.style.verticalAlign = 'bottom';
  td.id = unique + '_paymentPercent2_div';
  
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.textAlign = 'right';
  td.style.verticalAlign = 'bottom'
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_payment2Cash_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.paddingBottom = '5px';
  td.style.verticalAlign = 'bottom';
  td.appendChild(document.createTextNode('C'));
  
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.verticalAlign = 'bottom'
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_payment2Bank_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '5px';
  td.appendChild(document.createTextNode('B'));
  td = tr2.insertCell(-1);
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_payment2Queck_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '5px';
  td.appendChild(document.createTextNode('Q'));
  td = tr2.insertCell(-1);
  td.style.width = '70px';
  td.style.verticalAlign = 'bottom'
  var btn = DOMUtils.createInput('', '', 'button', '', null);
  btn.className = "paid";
  btn.id = unique + '_paid2_button';
  td.appendChild(btn);
  
  tr2 = table2.insertRow(-1);
  td = tr2.insertCell(-1);
  td.style.height = '5px';
  td.colSpan = '10';
  td.align = 'right';
  var table3 = document.createElement('table');
  table3.style.height = '10px';
  table3.cellPadding = 0;
  table3.cellSpacing = 0;
  table3.align = 'right';
  table3.border=0
  td.appendChild(table3);
  
  tr3 = table3.insertRow(-1);
  td = tr3.insertCell(-1);
  td.colSpan = '10';
  td.style.padding = '3px 0';
  td.style.color = '#555555';
  td.style.fontWeight = 'normal'; 
  td.style.fontSize = '8pt';
  td.style.fontStyle = 'italic';
  td.align = 'right';
  td.id = unique + '_paidHistory2_div';
  
  tr3 = table3.insertRow(-1);
  td = tr3.insertCell(-1);
  td.style.height = '32px';
  td.style.paddingTop = '6px';
  td.align = 'right';
  td.style.verticalAlign = 'middle';
  var table9 = document.createElement('table');
  table9.style.height = '32px';
  table9.style.verticalAlign = 'top';
  table9.cellPadding = 0;
  table9.cellSpacing = 0;
  td.appendChild(table9);
  
  tr9 = table9.insertRow(-1);
  td = tr9.insertCell(-1);
  td.style.width = '30px';
  td.style.verticalAlign = 'top';
  td.style.textAlign = 'left';
  td.id = unique + '_paidc2_div';
  td.appendChild(document.createTextNode('Paid:'));
  td = tr9.insertCell(-1);
  td.style.width = '70px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.style.color = '#000';
  td.style.fontWeight = ''; 
  td.style.fontSize = '9pt';
  td.id = unique + '_paid2_div';
  td = tr9.insertCell(-1);
  td.style.width = '30px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.appendChild(document.createTextNode('Due:'));
  td = tr9.insertCell(-1);
  td.style.width = '160px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.style.color = '#000';
  td.style.fontWeight = ''; 
  td.style.fontSize = '9pt';
  td.id = unique + '_due2_div';
  

  tr1 = table1.insertRow(-1);
  td = tr1.insertCell(-1);
  td.style.width = '380px';
  td.style.fontWeight = 'bold';
  td.style.fontSize = '110%';
  td.style.color = '#694247';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top'
  var table2 = document.createElement('table');
  table2.style.width = '380px';
  table2.cellPadding = 0;
  table2.cellSpacing = 0;
  table2.style.verticalAlign = 'top';
  table2.id = unique + '_payment3_div';
  table2.border=0
  td.appendChild(table2);
  
  tr2 = table2.insertRow(-1);
  td = tr2.insertCell(-1);
  td.style.width = '97px';
  td.style.height = '30px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '4px';
  td.appendChild(document.createTextNode('3'));
  var span = document.createElement('span');
  span.style.verticalAlign = 'super';
  span.style.fontSize = '80%';
  span.appendChild(document.createTextNode('rd'));
  td.appendChild(span);
  td.appendChild(document.createTextNode(' Payment'));
  
  td = tr2.insertCell(-1);
  td.style.width = '90px';
  td.style.height = '30px';
  td.style.textAlign = 'center';
  td.style.verticalAlign = 'bottom';
  var input = DOMUtils.createInput('', '', 'text', '', null)
  input.id = unique + '_payment3_text';
  input.style.borderRight = 'solid 1px #fff';
  input.style.borderBottom = 'solid 1px #fff';
  input.style.borderTop = 'solid 1px #d2c4b9';
  input.style.borderLeft = 'solid 1px #d2c4b9';
  input.style.width = '90px';
  input.style.height = '18px';
  td.appendChild(input);
  
  td = tr2.insertCell(-1);
  td.style.width = '40px';
  td.style.height = '24px';
  td.style.paddingBottom = '6px';
  td.style.textAlign = 'center';
  td.style.color = '#000';
  td.style.fontWeight = 'normal'; 
  td.style.fontSize = '9pt';
  td.style.verticalAlign = 'bottom';
  td.id = unique + '_paymentPercent3_div';
  
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.textAlign = 'right';
  td.style.verticalAlign = 'bottom'
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_payment3Cash_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.paddingBottom = '5px';
  td.style.verticalAlign = 'bottom';
  td.appendChild(document.createTextNode('C'));
  
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.verticalAlign = 'bottom'
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_payment3Bank_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '5px';
  td.appendChild(document.createTextNode('B'));
  td = tr2.insertCell(-1);
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_payment3Queck_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '5px';
  td.appendChild(document.createTextNode('Q'));
  td = tr2.insertCell(-1);
  td.style.width = '70px';
  td.style.verticalAlign = 'bottom'
  var btn = DOMUtils.createInput('', '', 'button', '', null);
  btn.className = "paid";
  btn.id = unique + '_paid3_button';
  td.appendChild(btn);
  
  tr2 = table2.insertRow(-1);
  td = tr2.insertCell(-1);
  td.style.height = '5px';
  td.colSpan = '10';
  td.align = 'right';
  var table3 = document.createElement('table');
  table3.style.height = '10px';
  table3.cellPadding = 0;
  table3.cellSpacing = 0;
  table3.align = 'right';
  table3.border=0
  td.appendChild(table3);
  
  tr3 = table3.insertRow(-1);
  td = tr3.insertCell(-1);
  td.colSpan = '10';
  td.style.padding = '3px 0';
  td.style.color = '#555555';
  td.style.fontWeight = 'normal'; 
  td.style.fontSize = '8pt';
  td.align = 'right';
  td.style.fontStyle = 'italic';
  td.id = unique + '_paidHistory3_div';
  
  tr3 = table3.insertRow(-1);
  td = tr3.insertCell(-1);
  td.style.height = '32px';
  td.style.paddingTop = '6px';
  td.align = 'right';
  td.style.verticalAlign = 'middle';
  var table9 = document.createElement('table');
  table9.style.height = '32px';
  table9.style.verticalAlign = 'top';
  table9.cellPadding = 0;
  table9.cellSpacing = 0;
  td.appendChild(table9);
  
  tr9 = table9.insertRow(-1);
  td = tr9.insertCell(-1);
  td.style.width = '30px';
  td.style.verticalAlign = 'top';
  td.style.textAlign = 'left';
  td.id = unique + '_paidc3_div';
  td.appendChild(document.createTextNode('Paid:'));
  td = tr9.insertCell(-1);
  td.style.width = '70px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.style.color = '#000';
  td.style.fontWeight = ''; 
  td.style.fontSize = '9pt';
  td.id = unique + '_paid3_div';
  td = tr9.insertCell(-1);
  td.style.width = '30px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.appendChild(document.createTextNode('Due:'));
  td = tr9.insertCell(-1);
  td.style.width = '160px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.style.color = '#000';
  td.style.fontWeight = ''; 
  td.style.fontSize = '9pt';
  td.id = unique + '_due3_div';
  
  td = tr1.insertCell(-1);
  td.style.width = '60px';
  
  td = tr1.insertCell(-1);
  td.style.width = '380px';
  td.style.fontWeight = 'bold';
  td.style.fontSize = '110%';
  td.style.color = '#694247';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top'
  var table2 = document.createElement('table');
  table2.style.width = '380px';
  table2.cellPadding = 0;
  table2.cellSpacing = 0;
  table2.style.verticalAlign = 'top';
  table2.id = unique + '_payment4_div';
  table2.border=0
  td.appendChild(table2);
  
  tr2 = table2.insertRow(-1);
  td = tr2.insertCell(-1);
  td.style.width = '97px';
  td.style.height = '30px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '4px';
  td.appendChild(document.createTextNode('4'));
  var span = document.createElement('span');
  span.style.verticalAlign = 'super';
  span.style.fontSize = '80%';
  span.appendChild(document.createTextNode('th'));
  td.appendChild(span);
  td.appendChild(document.createTextNode(' Payment'));
  
  td = tr2.insertCell(-1);
  td.style.width = '90px';
  td.style.height = '30px';
  td.style.textAlign = 'center';
  td.style.verticalAlign = 'bottom';
  var input = DOMUtils.createInput('', '', 'text', '', null)
  input.id = unique + '_payment4_text';
  input.style.borderRight = 'solid 1px #fff';
  input.style.borderBottom = 'solid 1px #fff';
  input.style.borderTop = 'solid 1px #d2c4b9';
  input.style.borderLeft = 'solid 1px #d2c4b9';
  input.style.width = '90px';
  input.style.height = '18px';
  td.appendChild(input);
  
  td = tr2.insertCell(-1);
  td.style.width = '40px';
  td.style.height = '24px';
  td.style.paddingBottom = '6px';
  td.style.textAlign = 'center';
  td.style.color = '#000';
  td.style.fontWeight = 'normal'; 
  td.style.fontSize = '9pt';
  td.style.verticalAlign = 'bottom';
  td.id = unique + '_paymentPercent4_div';
  
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.textAlign = 'right';
  td.style.verticalAlign = 'bottom'
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_payment4Cash_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.paddingBottom = '5px';
  td.style.verticalAlign = 'bottom';
  td.appendChild(document.createTextNode('C'));
  
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.verticalAlign = 'bottom'
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_payment4Bank_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '5px';
  td.appendChild(document.createTextNode('B'));
  td = tr2.insertCell(-1);
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '3px';
  var input = DOMUtils.createInput('', '', 'radio', '', null);
  input.id = unique + '_payment4Queck_radio';
  td.appendChild(input);
  td = tr2.insertCell(-1);
  td.style.width = '15px';
  td.style.verticalAlign = 'bottom';
  td.style.paddingBottom = '5px';
  td.appendChild(document.createTextNode('Q'));
  td = tr2.insertCell(-1);
  td.style.width = '70px';
  td.style.verticalAlign = 'bottom'
  var btn = DOMUtils.createInput('', '', 'button', '', null);
  btn.className = "paid";
  btn.id = unique + '_paid4_button';
  td.appendChild(btn);
  
  tr2 = table2.insertRow(-1);
  td = tr2.insertCell(-1);
  td.style.height = '5px';
  td.colSpan = '10';
  td.align = 'right';
  var table3 = document.createElement('table');
  table3.style.height = '10px';
  table3.cellPadding = 0;
  table3.cellSpacing = 0;
  table3.align = 'right';
  table3.border=0
  td.appendChild(table3);
  
  tr3 = table3.insertRow(-1);
  td = tr3.insertCell(-1);
  td.colSpan = '10';
  td.style.padding = '3px 0';
  td.style.color = '#555555';
  td.style.fontWeight = 'normal'; 
  td.style.fontSize = '8pt';
  td.style.fontStyle = 'italic';
  td.align = 'right';
  td.id = unique + '_paidHistory4_div';
  
  tr3 = table3.insertRow(-1);
  td = tr3.insertCell(-1);
  td.style.height = '32px';
  td.style.paddingTop = '6px';
  td.align = 'right';
  td.style.verticalAlign = 'middle';
  var table9 = document.createElement('table');
  table9.style.height = '32px';
  table9.style.verticalAlign = 'top';
  table9.cellPadding = 0;
  table9.cellSpacing = 0;
  td.appendChild(table9);
  
  tr9 = table9.insertRow(-1);
  td = tr9.insertCell(-1);
  td.style.width = '30px';
  td.style.verticalAlign = 'top';
  td.style.textAlign = 'left';
  td.id = unique + '_paidc4_div';
  td.appendChild(document.createTextNode('Paid:'));
  td = tr9.insertCell(-1);
  td.style.width = '70px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.style.color = '#000';
  td.style.fontWeight = ''; 
  td.style.fontSize = '9pt';
  td.id = unique + '_paid4_div';
  td = tr9.insertCell(-1);
  td.style.width = '30px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.appendChild(document.createTextNode('Due:'));
  td = tr9.insertCell(-1);
  td.style.width = '160px';
  td.style.textAlign = 'left';
  td.style.verticalAlign = 'top';
  td.style.color = '#000';
  td.style.fontWeight = ''; 
  td.style.fontSize = '9pt';
  td.id = unique + '_due4_div';
  
  gui = GuiDialogIPayment.instance(unique);
  new HandleDialogIPayment(gui, this._item, this._options);
};
  